class Solution {
public:
    void inorder_travel(TreeNode* root,vector<int>& ret)
    {
        if(root == nullptr)
        {
            return;
        }
        inorder_travel(root->left,ret);
        ret.push_back(root->val);
        inorder_travel(root->right,ret);
    }
    vector<int> inorderTraversal(TreeNode* root) {
        vector<int> ret;
        inorder_travel(root,ret);
        return ret;
    }
};